< previous page page_390 next page >

Page 390
Listing 17.5 shows the code for the terminateSystem method of CApplication.
LISTING 17.5. THEterminateSystemMETHOD OFCApplication.

9f8044bafea36a1f728739c0bb58ef4c.gif
 1:
 2: Public Sub terminateSystem()
 3:     theAppTransactions.addTrans2Text Shutting down the  &
      App. EXEName &  system
 4:     'Set ifcDBConnection = Nothing
 5:     'theAppTransactions.addTrans2MemLog Deallocated memory for   ifcDBConnection in CApplication.terminateSystem
 6:
 7:     'Save all transactions
 8:     TransactionGroup.saveAllTransactions
 9:
10:     m_returns = ifcDBConnection.closeDBConnection
11:     theAppTransactions.addTrans2MemLog Deallocated memory for   clsApplication in CApplication.terminateSystem
12:     theAppTransactions.addTrans2MemLog Deallocated memory for   theAppTransactions in CApplication.terminateSystem
13:
14:     For m_returns = 0 To Forms.Count - 2
15:         theAppTransactions.addTrans2MemLog Deallocated memory
              for  & Forms(m_returns).Name &  in
              CApplication.terminateSystem
16:         'Because you are unloading the form that houses the   Rich Text Box, you
17: 'must save your log first.
18:     Next
19:     m_returns = theAppTransactions.saveLog
20:     For m_returns = 0 To Forms.Count - 2
21:         If Not IsEmpty(Forms(m_returns)) Then
22:             Unload Forms(m_returns)
23:         End If
24:     Next
25:     Set clsApplication = Nothing
26:     Set theAppTransactions = Nothing
27:     'End
28: End Sub

Listing 17.6 shows the deposit method of the DepositFunds class.

 
< previous page page_390 next page >

If you like this book, buy it!